<div class="property-display-wrapper">
		<?php 
			global $post;
			
			if ( has_post_thumbnail() ) 
			{			
				$image_id = get_post_thumbnail_id();
				$image_url = wp_get_attachment_image_src($image_id,'full-size', true);		
				
				$lightbox_array = array('No');					
				if( function_exists( 'ot_get_option' ) )
				{								
					$lightbox_array = ot_get_option('lightbox',array('No'));
				}
				
				if($lightbox_array[0] == 'Yes')
				{																																				
					?>
					<a class="pretty-photo" href="<?php echo $image_url[0]; ?>" title="<?php the_title(); ?>">
					<?php
				}
				else
				{
					?>
					<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
					<?php
				}			
				?>					
						<?php the_post_thumbnail('property-post-thumb',array( 
																		'alt'	=> trim(strip_tags( get_the_title($post->ID) )), 
																		'title'	=> trim(strip_tags( get_the_title($post->ID) )) 
																		));	?>
					</a>
				<?php
			}
		?>
		
		<div class="pricetag-listing">
				<?php 
				$terms = get_the_terms( $post->ID,"property-type" );
				
				if ( $terms && ! is_wp_error( $terms ) ) 
				{														   														   
					   foreach ( $terms as $term )
					   {															   
							echo '<small><a class="property-type" href="' . get_term_link($term->slug, "property-type" ) .'">'.$term->name.'</a></small>';
							break; // to display only one property type
					   }														   													   														   
				}
							
				?>
				<h5 class="price"><?php theme_currency(); echo number_format(intval(get_post_meta($post->ID, 'locality_property_price', true))); ?></h5>
		</div>
		
		<?php 
			$porperty_status = get_post_meta($post->ID, 'locality_status', true); 
			if(!empty($porperty_status))
			{
				if( function_exists( 'ot_get_option' ) )
				{								
					$hide_ribbons = ot_get_option('hide_ribbons',array('No'));
					if($hide_ribbons[0] != 'Yes')
					{
						?>
						<p class="<?php echo $porperty_status; ?>"><?php echo $porperty_status; ?></p>
						<?php
					}
				}
			}
		?>
</div>

<div class="property-detail">
		<h4 class="property-title" ><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
		<p class="property-excerpt"><?php locality_excerpt(18); ?></p>
		<div class="property-features">
				<div class="feature">
						<p class="left-feature"><span class="city"><?php  
																			$city_terms = get_the_terms( $post->ID,"property-city" );
																			
																			if ( $city_terms && ! is_wp_error( $city_terms ) ) 
																			{														   														   
																				   foreach ( $city_terms as $city_term )
																				   {
																						echo  __('City:','locality').' <a href="' . get_term_link($city_term->slug, "property-city" ) .'">'.$city_term->name.'</a>';
																						break; // to display only one
																				   }														   													   														   
																			}
																						
																			 ?></span></p>
						<p class="right-feature"><span class="size"><?php _e('Size:','locality'); ?> <?php echo get_post_meta($post->ID, 'locality_property_size', true); theme_unit(); ?></span></p>
				</div>
				<div class="feature">
						<p class="left-feature"><span class="bed"><?php _e('Beds:','locality'); ?> <?php echo get_post_meta($post->ID, 'locality_property_bedrooms', true); ?></span></p>
						<p class="right-feature"><span class="bath"><?php _e('Baths:','locality'); ?> <?php echo get_post_meta($post->ID, 'locality_property_bathrooms', true); ?></span></p>
				</div>
		</div>
</div>